FROM openresty/openresty:alpine
RUN apk update
RUN apk add tzdata
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo "Asia/Shanghai" > /etc/timezone
RUN apk del tzdata
RUN rm -rf /var/cache/apk/*
COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
RUN mkdir /usr/local/openresty/nginx/conf/conf.d
ADD run.sh /run.sh
RUN chmod +x /run.sh
EXPOSE 80 443
VOLUME ["/usr/local/openresty/nginx/conf/conf.d"]
WORKDIR "/usr/local/openresty/nginx/conf/conf.d"
CMD ["/run.sh"]
ENTRYPOINT []